package model

import (
	"gorm.io/gorm"
	"video-mgr/video-server/basic/config"
)

type Video struct {
	gorm.Model
	Title   string `gorm:"type:varchar(30);comment:标题"`
	Content string `gorm:"type:varchar(300);comment:简介"`
	Sort    string `gorm:"type:varchar(30);comment:分类"`
	Address string `gorm:"type:varchar(50);comment:地区"`
	Year    string `gorm:"type:varchar(50);comment:年份"`
	Image   string `gorm:"type:varchar(500);comment:封面"`
}

func CreateVideo(v *Video) error {

	return config.DB.Create(&v).Error
}
